<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>pytils.test.test_dt</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pytils-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="pytils-module.html">Package&nbsp;pytils</a> ::
        <a href="pytils.test-module.html">Package&nbsp;test</a> ::
        Module&nbsp;test_dt
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript: void(0);" class="privatelink"
    onclick="toggle_private();">hide private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="pytils.test.test_dt-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="pytils.test.test_dt-module.html">Module pytils.test.test_dt</a></h1>
<pre class="py-src">
<span class="py-lineno">  1</span>  <span class="py-line"><span class="py-comment"># -*- coding: utf-8 -*-</span> </span>
<span class="py-lineno">  2</span>  <span class="py-line"><span class="py-comment"></span><span class="py-comment"># License: GNU GPL2</span> </span>
<span class="py-lineno">  3</span>  <span class="py-line"><span class="py-comment"></span><span class="py-comment"># Author: Pythy &lt;the.pythy@gmail.com&gt;</span> </span>
<span class="py-lineno">  4</span>  <span class="py-line"><span class="py-comment"></span><span class="py-docstring">"""</span> </span>
<span class="py-lineno">  5</span>  <span class="py-line"><span class="py-docstring">Unit-tests for pytils.dt</span> </span>
<span class="py-lineno">  6</span>  <span class="py-line"><span class="py-docstring">"""</span> </span>
<span class="py-lineno">  7</span>  <span class="py-line"> </span>
<span class="py-lineno">  8</span>  <span class="py-line"><span id="link-0" class="py-name"><a title="pytils.__id__
pytils.dt.__id__
pytils.numeral.__id__
pytils.templatetags.__id__
pytils.templatetags.pytils_dt.__id__
pytils.templatetags.pytils_numeral.__id__
pytils.templatetags.pytils_translit.__id__
pytils.test.__id__
pytils.test.test_dt.__id__
pytils.test.test_numeral.__id__
pytils.test.test_translit.__id__
pytils.test.test_utils.__id__
pytils.translit.__id__
pytils.utils.__id__" class="py-name" href="#" onclick="doclink('link-0', '__id__', 'Variable pytils.__id__=pytils-module.html#__id__,Variable pytils.dt.__id__=pytils.dt-module.html#__id__,Variable pytils.numeral.__id__=pytils.numeral-module.html#__id__,Variable pytils.templatetags.__id__=pytils.templatetags-module.html#__id__,Variable pytils.templatetags.pytils_dt.__id__=pytils.templatetags.pytils_dt-module.html#__id__,Variable pytils.templatetags.pytils_numeral.__id__=pytils.templatetags.pytils_numeral-module.html#__id__,Variable pytils.templatetags.pytils_translit.__id__=pytils.templatetags.pytils_translit-module.html#__id__,Variable pytils.test.__id__=pytils.test-module.html#__id__,Variable pytils.test.test_dt.__id__=pytils.test.test_dt-module.html#__id__,Variable pytils.test.test_numeral.__id__=pytils.test.test_numeral-module.html#__id__,Variable pytils.test.test_translit.__id__=pytils.test.test_translit-module.html#__id__,Variable pytils.test.test_utils.__id__=pytils.test.test_utils-module.html#__id__,Variable pytils.translit.__id__=pytils.translit-module.html#__id__,Variable pytils.utils.__id__=pytils.utils-module.html#__id__'); return false;">__id__</a></span></span> <span class="py-op">=</span> <span id="link-1" class="py-name"><a title="pytils.__revision__
pytils.dt.__revision__
pytils.numeral.__revision__
pytils.templatetags.__revision__
pytils.templatetags.pytils_dt.__revision__
pytils.templatetags.pytils_numeral.__revision__
pytils.templatetags.pytils_translit.__revision__
pytils.test.__revision__
pytils.test.test_dt.__revision__
pytils.test.test_numeral.__revision__
pytils.test.test_translit.__revision__
pytils.test.test_utils.__revision__
pytils.translit.__revision__
pytils.utils.__revision__" class="py-name" href="#" onclick="doclink('link-1', '__revision__', 'Variable pytils.__revision__=pytils-module.html#__revision__,Variable pytils.dt.__revision__=pytils.dt-module.html#__revision__,Variable pytils.numeral.__revision__=pytils.numeral-module.html#__revision__,Variable pytils.templatetags.__revision__=pytils.templatetags-module.html#__revision__,Variable pytils.templatetags.pytils_dt.__revision__=pytils.templatetags.pytils_dt-module.html#__revision__,Variable pytils.templatetags.pytils_numeral.__revision__=pytils.templatetags.pytils_numeral-module.html#__revision__,Variable pytils.templatetags.pytils_translit.__revision__=pytils.templatetags.pytils_translit-module.html#__revision__,Variable pytils.test.__revision__=pytils.test-module.html#__revision__,Variable pytils.test.test_dt.__revision__=pytils.test.test_dt-module.html#__revision__,Variable pytils.test.test_numeral.__revision__=pytils.test.test_numeral-module.html#__revision__,Variable pytils.test.test_translit.__revision__=pytils.test.test_translit-module.html#__revision__,Variable pytils.test.test_utils.__revision__=pytils.test.test_utils-module.html#__revision__,Variable pytils.translit.__revision__=pytils.translit-module.html#__revision__,Variable pytils.utils.__revision__=pytils.utils-module.html#__revision__'); return false;">__revision__</a></span></span> <span class="py-op">=</span> <span class="py-string">"$Id: test_dt.py 18 2006-10-17 15:58:01Z the.pythy $"</span> </span>
<span class="py-lineno">  9</span>  <span class="py-line"><span id="link-2" class="py-name"><a title="pytils.__url__
pytils.dt.__url__
pytils.numeral.__url__
pytils.templatetags.__url__
pytils.templatetags.pytils_dt.__url__
pytils.templatetags.pytils_numeral.__url__
pytils.templatetags.pytils_translit.__url__
pytils.test.__url__
pytils.test.test_dt.__url__
pytils.test.test_numeral.__url__
pytils.test.test_translit.__url__
pytils.test.test_utils.__url__
pytils.translit.__url__
pytils.utils.__url__" class="py-name" href="#" onclick="doclink('link-2', '__url__', 'Variable pytils.__url__=pytils-module.html#__url__,Variable pytils.dt.__url__=pytils.dt-module.html#__url__,Variable pytils.numeral.__url__=pytils.numeral-module.html#__url__,Variable pytils.templatetags.__url__=pytils.templatetags-module.html#__url__,Variable pytils.templatetags.pytils_dt.__url__=pytils.templatetags.pytils_dt-module.html#__url__,Variable pytils.templatetags.pytils_numeral.__url__=pytils.templatetags.pytils_numeral-module.html#__url__,Variable pytils.templatetags.pytils_translit.__url__=pytils.templatetags.pytils_translit-module.html#__url__,Variable pytils.test.__url__=pytils.test-module.html#__url__,Variable pytils.test.test_dt.__url__=pytils.test.test_dt-module.html#__url__,Variable pytils.test.test_numeral.__url__=pytils.test.test_numeral-module.html#__url__,Variable pytils.test.test_translit.__url__=pytils.test.test_translit-module.html#__url__,Variable pytils.test.test_utils.__url__=pytils.test.test_utils-module.html#__url__,Variable pytils.translit.__url__=pytils.translit-module.html#__url__,Variable pytils.utils.__url__=pytils.utils-module.html#__url__'); return false;">__url__</a></span></span> <span class="py-op">=</span> <span class="py-string">"$URL: https://pythy.googlecode.com/svn/trunk/pytils/pytils/test/test_dt.py $"</span> </span>
<span class="py-lineno"> 10</span>  <span class="py-line"> </span>
<span class="py-lineno"> 11</span>  <span class="py-line"><span class="py-keyword">import</span> <span class="py-name">datetime</span> </span>
<span class="py-lineno"> 12</span>  <span class="py-line"><span class="py-keyword">import</span> <span class="py-name">time</span> </span>
<span class="py-lineno"> 13</span>  <span class="py-line"><span class="py-keyword">import</span> <span class="py-name">unittest</span> </span>
<span class="py-lineno"> 14</span>  <span class="py-line"> </span>
<span class="py-lineno"> 15</span>  <span class="py-line"><span class="py-keyword">import</span> <span id="link-3" class="py-name"><a title="pytils" class="py-name" href="#" onclick="doclink('link-3', 'pytils', 'Package pytils=pytils-module.html'); return false;">pytils</a></span></span>  </span>
<span class="py-lineno"> 16</span>  <span class="py-line"> </span>
<a name="DistanceOfTimeInWordsTestCase"></a><div id="DistanceOfTimeInWordsTestCase-def"><span class="py-lineno"> 17</span> <a class="py-toggle" href="#" id="DistanceOfTimeInWordsTestCase-toggle" onclick="toggle('DistanceOfTimeInWordsTestCase'); return false;">-</a><span class="py-line"><span class="py-keyword">class</span> <a class="py-def-name" href="pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html">DistanceOfTimeInWordsTestCase</a><span class="py-op">(</span><span class="py-base-class">unittest</span><span class="py-op">.</span><span class="py-base-class">TestCase</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="DistanceOfTimeInWordsTestCase-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="DistanceOfTimeInWordsTestCase-expanded"><span class="py-lineno"> 18</span>  <span class="py-line">    <span class="py-docstring">"""</span> </span>
<span class="py-lineno"> 19</span>  <span class="py-line"><span class="py-docstring">    Test case for pytils.dt.distance_of_time_in_words</span> </span>
<span class="py-lineno"> 20</span>  <span class="py-line"><span class="py-docstring">    """</span> </span>
<span class="py-lineno"> 21</span>  <span class="py-line"> </span>
<a name="DistanceOfTimeInWordsTestCase.setUp"></a><div id="DistanceOfTimeInWordsTestCase.setUp-def"><span class="py-lineno"> 22</span> <a class="py-toggle" href="#" id="DistanceOfTimeInWordsTestCase.setUp-toggle" onclick="toggle('DistanceOfTimeInWordsTestCase.setUp'); return false;">-</a><span class="py-line">    <span class="py-keyword">def</span> <a class="py-def-name" href="pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#setUp">setUp</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="DistanceOfTimeInWordsTestCase.setUp-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DistanceOfTimeInWordsTestCase.setUp-expanded"><span class="py-lineno"> 23</span>  <span class="py-line">        <span class="py-docstring">"""</span> </span>
<span class="py-lineno"> 24</span>  <span class="py-line"><span class="py-docstring">        Setting up environment for tests</span> </span>
<span class="py-lineno"> 25</span>  <span class="py-line"><span class="py-docstring">        """</span> </span>
<span class="py-lineno"> 26</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">time</span> <span class="py-op">=</span> <span class="py-number">1156862275.7711999</span> </span>
<span class="py-lineno"> 27</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span> <span class="py-op">=</span> <span class="py-op">{</span><span class="py-op">}</span> </span>
<span class="py-lineno"> 28</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-4" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.updateTime" class="py-name" href="#" onclick="doclink('link-4', 'updateTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.updateTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#updateTime'); return false;">updateTime</a></span></span><span class="py-op">(</span><span class="py-name">self</span><span class="py-op">.</span><span class="py-name">time</span><span class="py-op">)</span> </span>
</div><span class="py-lineno"> 29</span>  <span class="py-line"> </span>
<a name="DistanceOfTimeInWordsTestCase.updateTime"></a><div id="DistanceOfTimeInWordsTestCase.updateTime-def"><span class="py-lineno"> 30</span> <a class="py-toggle" href="#" id="DistanceOfTimeInWordsTestCase.updateTime-toggle" onclick="toggle('DistanceOfTimeInWordsTestCase.updateTime'); return false;">-</a><span class="py-line">    <span class="py-keyword">def</span> <a class="py-def-name" href="pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#updateTime">updateTime</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span> <span class="py-param">_time</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="DistanceOfTimeInWordsTestCase.updateTime-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DistanceOfTimeInWordsTestCase.updateTime-expanded"><span class="py-lineno"> 31</span>  <span class="py-line">        <span class="py-docstring">"""Update all time-related values for current time """</span> </span>
<span class="py-lineno"> 32</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-string">'10sec_ago'</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">_time</span> <span class="py-op">-</span> <span class="py-number">10</span> </span>
<span class="py-lineno"> 33</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-string">'1min_ago'</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">_time</span> <span class="py-op">-</span> <span class="py-number">60</span> </span>
<span class="py-lineno"> 34</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-string">'10min_ago'</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">_time</span> <span class="py-op">-</span> <span class="py-number">600</span> </span>
<span class="py-lineno"> 35</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-string">'1hr_ago'</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">_time</span> <span class="py-op">-</span> <span class="py-number">3720</span> </span>
<span class="py-lineno"> 36</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-string">'10hr_ago'</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">_time</span> <span class="py-op">-</span> <span class="py-number">36600</span> </span>
<span class="py-lineno"> 37</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-string">'1day_ago'</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">_time</span> <span class="py-op">-</span> <span class="py-number">87600</span> </span>
<span class="py-lineno"> 38</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-string">'1day1hr_ago'</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">_time</span> <span class="py-op">-</span> <span class="py-number">90600</span> </span>
<span class="py-lineno"> 39</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-string">'2day_ago'</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">_time</span> <span class="py-op">-</span> <span class="py-number">87600</span><span class="py-op">*</span><span class="py-number">2</span> </span>
<span class="py-lineno"> 40</span>  <span class="py-line"> </span>
<span class="py-lineno"> 41</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-string">'in_10sec'</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">_time</span> <span class="py-op">+</span> <span class="py-number">10</span> </span>
<span class="py-lineno"> 42</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-string">'in_1min'</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">_time</span> <span class="py-op">+</span> <span class="py-number">61</span> </span>
<span class="py-lineno"> 43</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-string">'in_10min'</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">_time</span> <span class="py-op">+</span> <span class="py-number">601</span> </span>
<span class="py-lineno"> 44</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-string">'in_1hr'</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">_time</span> <span class="py-op">+</span> <span class="py-number">3721</span> </span>
<span class="py-lineno"> 45</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-string">'in_10hr'</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">_time</span> <span class="py-op">+</span> <span class="py-number">36601</span> </span>
<span class="py-lineno"> 46</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-string">'in_1day'</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">_time</span> <span class="py-op">+</span> <span class="py-number">87601</span> </span>
<span class="py-lineno"> 47</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-string">'in_1day1hr'</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">_time</span> <span class="py-op">+</span> <span class="py-number">90601</span> </span>
<span class="py-lineno"> 48</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-string">'in_2day'</span><span class="py-op">]</span> <span class="py-op">=</span> <span class="py-name">_time</span> <span class="py-op">+</span> <span class="py-number">87600</span><span class="py-op">*</span><span class="py-number">2</span> <span class="py-op">+</span> <span class="py-number">1</span> </span>
</div><span class="py-lineno"> 49</span>  <span class="py-line"> </span>
<a name="DistanceOfTimeInWordsTestCase.ckDefaultAccuracy"></a><div id="DistanceOfTimeInWordsTestCase.ckDefaultAccuracy-def"><span class="py-lineno"> 50</span> <a class="py-toggle" href="#" id="DistanceOfTimeInWordsTestCase.ckDefaultAccuracy-toggle" onclick="toggle('DistanceOfTimeInWordsTestCase.ckDefaultAccuracy'); return false;">-</a><span class="py-line">    <span class="py-keyword">def</span> <a class="py-def-name" href="pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy">ckDefaultAccuracy</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span> <span class="py-param">typ</span><span class="py-op">,</span> <span class="py-param">estimated</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="DistanceOfTimeInWordsTestCase.ckDefaultAccuracy-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DistanceOfTimeInWordsTestCase.ckDefaultAccuracy-expanded"><span class="py-lineno"> 51</span>  <span class="py-line">        <span class="py-docstring">"""</span> </span>
<span class="py-lineno"> 52</span>  <span class="py-line"><span class="py-docstring">        Checks with default value for accuracy</span> </span>
<span class="py-lineno"> 53</span>  <span class="py-line"><span class="py-docstring">        """</span> </span>
<span class="py-lineno"> 54</span>  <span class="py-line">        <span class="py-name">t0</span> <span class="py-op">=</span> <span class="py-name">time</span><span class="py-op">.</span><span class="py-name">time</span><span class="py-op">(</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 55</span>  <span class="py-line">        <span class="py-comment"># --- change state !!! attention</span> </span>
<span class="py-lineno"> 56</span>  <span class="py-line"><span class="py-comment"></span>        <span class="py-name">self</span><span class="py-op">.</span><span id="link-5" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.updateTime" class="py-name" href="#" onclick="doclink('link-5', 'updateTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.updateTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#updateTime'); return false;">updateTime</a></span></span><span class="py-op">(</span><span class="py-name">t0</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 57</span>  <span class="py-line">        <span class="py-comment"># ---</span> </span>
<span class="py-lineno"> 58</span>  <span class="py-line"><span class="py-comment"></span>        <span class="py-name">t1</span> <span class="py-op">=</span> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-name">typ</span><span class="py-op">]</span> </span>
<span class="py-lineno"> 59</span>  <span class="py-line">        <span class="py-name">res</span> <span class="py-op">=</span> <span id="link-6" class="py-name"><a title="pytils" class="py-name" href="#" onclick="doclink('link-6', 'pytils', 'Package pytils=pytils-module.html'); return false;">pytils</a></span></span><span class="py-op">.</span><span id="link-7" class="py-name"><a title="pytils.dt" class="py-name" href="#" onclick="doclink('link-7', 'dt', 'Module pytils.dt=pytils.dt-module.html'); return false;">dt</a></span></span><span class="py-op">.</span><span id="link-8" class="py-name"><a title="pytils.dt.distance_of_time_in_words" class="py-name" href="#" onclick="doclink('link-8', 'distance_of_time_in_words', 'Function pytils.dt.distance_of_time_in_words()=pytils.dt-module.html#distance_of_time_in_words'); return false;">distance_of_time_in_words</a></span></span><span class="py-op">(</span><span class="py-name">from_time</span><span class="py-op">=</span><span class="py-name">t1</span><span class="py-op">,</span> <span class="py-name">to_time</span><span class="py-op">=</span><span class="py-name">t0</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 60</span>  <span class="py-line">        <span class="py-comment"># --- revert state to original value</span> </span>
<span class="py-lineno"> 61</span>  <span class="py-line"><span class="py-comment"></span>        <span class="py-name">self</span><span class="py-op">.</span><span id="link-9" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.updateTime" class="py-name" href="#" onclick="doclink('link-9', 'updateTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.updateTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#updateTime'); return false;">updateTime</a></span></span><span class="py-op">(</span><span class="py-name">self</span><span class="py-op">.</span><span class="py-name">time</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 62</span>  <span class="py-line">        <span class="py-comment"># ---</span> </span>
<span class="py-lineno"> 63</span>  <span class="py-line"><span class="py-comment"></span>        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">assertEquals</span><span class="py-op">(</span><span class="py-name">res</span><span class="py-op">,</span> <span class="py-name">estimated</span><span class="py-op">)</span> </span>
</div><span class="py-lineno"> 64</span>  <span class="py-line"> </span>
<a name="DistanceOfTimeInWordsTestCase.ckDefaultToTime"></a><div id="DistanceOfTimeInWordsTestCase.ckDefaultToTime-def"><span class="py-lineno"> 65</span> <a class="py-toggle" href="#" id="DistanceOfTimeInWordsTestCase.ckDefaultToTime-toggle" onclick="toggle('DistanceOfTimeInWordsTestCase.ckDefaultToTime'); return false;">-</a><span class="py-line">    <span class="py-keyword">def</span> <a class="py-def-name" href="pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime">ckDefaultToTime</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span> <span class="py-param">typ</span><span class="py-op">,</span> <span class="py-param">accuracy</span><span class="py-op">,</span> <span class="py-param">estimated</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="DistanceOfTimeInWordsTestCase.ckDefaultToTime-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DistanceOfTimeInWordsTestCase.ckDefaultToTime-expanded"><span class="py-lineno"> 66</span>  <span class="py-line">        <span class="py-docstring">"""</span> </span>
<span class="py-lineno"> 67</span>  <span class="py-line"><span class="py-docstring">        Checks with default value of time</span> </span>
<span class="py-lineno"> 68</span>  <span class="py-line"><span class="py-docstring">        """</span> </span>
<span class="py-lineno"> 69</span>  <span class="py-line">        <span class="py-name">t0</span> <span class="py-op">=</span> <span class="py-name">time</span><span class="py-op">.</span><span class="py-name">time</span><span class="py-op">(</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 70</span>  <span class="py-line">        <span class="py-comment"># --- change state !!! attention</span> </span>
<span class="py-lineno"> 71</span>  <span class="py-line"><span class="py-comment"></span>        <span class="py-name">self</span><span class="py-op">.</span><span id="link-10" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.updateTime" class="py-name" href="#" onclick="doclink('link-10', 'updateTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.updateTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#updateTime'); return false;">updateTime</a></span></span><span class="py-op">(</span><span class="py-name">t0</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 72</span>  <span class="py-line">        <span class="py-comment"># ---</span> </span>
<span class="py-lineno"> 73</span>  <span class="py-line"><span class="py-comment"></span>        <span class="py-name">t1</span> <span class="py-op">=</span> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">dtime</span><span class="py-op">[</span><span class="py-name">typ</span><span class="py-op">]</span> </span>
<span class="py-lineno"> 74</span>  <span class="py-line">        <span class="py-name">res</span> <span class="py-op">=</span> <span id="link-11" class="py-name"><a title="pytils" class="py-name" href="#" onclick="doclink('link-11', 'pytils', 'Package pytils=pytils-module.html'); return false;">pytils</a></span></span><span class="py-op">.</span><span id="link-12" class="py-name"><a title="pytils.dt" class="py-name" href="#" onclick="doclink('link-12', 'dt', 'Module pytils.dt=pytils.dt-module.html'); return false;">dt</a></span></span><span class="py-op">.</span><span id="link-13" class="py-name"><a title="pytils.dt.distance_of_time_in_words" class="py-name" href="#" onclick="doclink('link-13', 'distance_of_time_in_words', 'Function pytils.dt.distance_of_time_in_words()=pytils.dt-module.html#distance_of_time_in_words'); return false;">distance_of_time_in_words</a></span></span><span class="py-op">(</span><span class="py-name">t1</span><span class="py-op">,</span> <span class="py-name">accuracy</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 75</span>  <span class="py-line">        <span class="py-comment"># --- revert state to original value</span> </span>
<span class="py-lineno"> 76</span>  <span class="py-line"><span class="py-comment"></span>        <span class="py-name">self</span><span class="py-op">.</span><span id="link-14" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.updateTime" class="py-name" href="#" onclick="doclink('link-14', 'updateTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.updateTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#updateTime'); return false;">updateTime</a></span></span><span class="py-op">(</span><span class="py-name">self</span><span class="py-op">.</span><span class="py-name">time</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 77</span>  <span class="py-line">        <span class="py-comment"># ---</span> </span>
<span class="py-lineno"> 78</span>  <span class="py-line"><span class="py-comment"></span>        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">assertEquals</span><span class="py-op">(</span><span class="py-name">res</span><span class="py-op">,</span> <span class="py-name">estimated</span><span class="py-op">)</span> </span>
</div><span class="py-lineno"> 79</span>  <span class="py-line"> </span>
<a name="DistanceOfTimeInWordsTestCase.testDOTIWDefaultAccuracy"></a><div id="DistanceOfTimeInWordsTestCase.testDOTIWDefaultAccuracy-def"><span class="py-lineno"> 80</span> <a class="py-toggle" href="#" id="DistanceOfTimeInWordsTestCase.testDOTIWDefaultAccuracy-toggle" onclick="toggle('DistanceOfTimeInWordsTestCase.testDOTIWDefaultAccuracy'); return false;">-</a><span class="py-line">    <span class="py-keyword">def</span> <a class="py-def-name" href="pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#testDOTIWDefaultAccuracy">testDOTIWDefaultAccuracy</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="DistanceOfTimeInWordsTestCase.testDOTIWDefaultAccuracy-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DistanceOfTimeInWordsTestCase.testDOTIWDefaultAccuracy-expanded"><span class="py-lineno"> 81</span>  <span class="py-line">        <span class="py-docstring">"""</span> </span>
<span class="py-lineno"> 82</span>  <span class="py-line"><span class="py-docstring">        Unit-test for distance_of_time_in_words with default accuracy</span> </span>
<span class="py-lineno"> 83</span>  <span class="py-line"><span class="py-docstring">        """</span> </span>
<span class="py-lineno"> 84</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-15" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy" class="py-name" href="#" onclick="doclink('link-15', 'ckDefaultAccuracy', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy'); return false;">ckDefaultAccuracy</a></span></span><span class="py-op">(</span><span class="py-string">"10sec_ago"</span><span class="py-op">,</span> <span class="py-string">u"&#1084;&#1077;&#1085;&#1077;&#1077; &#1084;&#1080;&#1085;&#1091;&#1090;&#1099; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 85</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-16" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy" class="py-name" href="#" onclick="doclink('link-16', 'ckDefaultAccuracy', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy'); return false;">ckDefaultAccuracy</a></span></span><span class="py-op">(</span><span class="py-string">"1min_ago"</span><span class="py-op">,</span> <span class="py-string">u"1 &#1084;&#1080;&#1085;&#1091;&#1090;&#1091; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 86</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-17" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy" class="py-name" href="#" onclick="doclink('link-17', 'ckDefaultAccuracy', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy'); return false;">ckDefaultAccuracy</a></span></span><span class="py-op">(</span><span class="py-string">"10min_ago"</span><span class="py-op">,</span> <span class="py-string">u"10 &#1084;&#1080;&#1085;&#1091;&#1090; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 87</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-18" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy" class="py-name" href="#" onclick="doclink('link-18', 'ckDefaultAccuracy', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy'); return false;">ckDefaultAccuracy</a></span></span><span class="py-op">(</span><span class="py-string">"1hr_ago"</span><span class="py-op">,</span> <span class="py-string">u"1 &#1095;&#1072;&#1089; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 88</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-19" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy" class="py-name" href="#" onclick="doclink('link-19', 'ckDefaultAccuracy', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy'); return false;">ckDefaultAccuracy</a></span></span><span class="py-op">(</span><span class="py-string">"10hr_ago"</span><span class="py-op">,</span> <span class="py-string">u"10 &#1095;&#1072;&#1089;&#1086;&#1074; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 89</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-20" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy" class="py-name" href="#" onclick="doclink('link-20', 'ckDefaultAccuracy', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy'); return false;">ckDefaultAccuracy</a></span></span><span class="py-op">(</span><span class="py-string">"1day_ago"</span><span class="py-op">,</span> <span class="py-string">u"1 &#1076;&#1077;&#1085;&#1100; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 90</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-21" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy" class="py-name" href="#" onclick="doclink('link-21', 'ckDefaultAccuracy', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy'); return false;">ckDefaultAccuracy</a></span></span><span class="py-op">(</span><span class="py-string">"1day1hr_ago"</span><span class="py-op">,</span> <span class="py-string">u"1 &#1076;&#1077;&#1085;&#1100; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 91</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-22" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy" class="py-name" href="#" onclick="doclink('link-22', 'ckDefaultAccuracy', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy'); return false;">ckDefaultAccuracy</a></span></span><span class="py-op">(</span><span class="py-string">"2day_ago"</span><span class="py-op">,</span> <span class="py-string">u"2 &#1076;&#1085;&#1103; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 92</span>  <span class="py-line"> </span>
<span class="py-lineno"> 93</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-23" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy" class="py-name" href="#" onclick="doclink('link-23', 'ckDefaultAccuracy', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy'); return false;">ckDefaultAccuracy</a></span></span><span class="py-op">(</span><span class="py-string">"in_10sec"</span><span class="py-op">,</span> <span class="py-string">u"&#1084;&#1077;&#1085;&#1077;&#1077; &#1095;&#1077;&#1084; &#1095;&#1077;&#1088;&#1077;&#1079; &#1084;&#1080;&#1085;&#1091;&#1090;&#1091;"</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 94</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-24" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy" class="py-name" href="#" onclick="doclink('link-24', 'ckDefaultAccuracy', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy'); return false;">ckDefaultAccuracy</a></span></span><span class="py-op">(</span><span class="py-string">"in_1min"</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 1 &#1084;&#1080;&#1085;&#1091;&#1090;&#1091;"</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 95</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-25" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy" class="py-name" href="#" onclick="doclink('link-25', 'ckDefaultAccuracy', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy'); return false;">ckDefaultAccuracy</a></span></span><span class="py-op">(</span><span class="py-string">"in_10min"</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 10 &#1084;&#1080;&#1085;&#1091;&#1090;"</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 96</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-26" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy" class="py-name" href="#" onclick="doclink('link-26', 'ckDefaultAccuracy', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy'); return false;">ckDefaultAccuracy</a></span></span><span class="py-op">(</span><span class="py-string">"in_1hr"</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 1 &#1095;&#1072;&#1089;"</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 97</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-27" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy" class="py-name" href="#" onclick="doclink('link-27', 'ckDefaultAccuracy', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy'); return false;">ckDefaultAccuracy</a></span></span><span class="py-op">(</span><span class="py-string">"in_10hr"</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 10 &#1095;&#1072;&#1089;&#1086;&#1074;"</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 98</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-28" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy" class="py-name" href="#" onclick="doclink('link-28', 'ckDefaultAccuracy', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy'); return false;">ckDefaultAccuracy</a></span></span><span class="py-op">(</span><span class="py-string">"in_1day"</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 1 &#1076;&#1077;&#1085;&#1100;"</span><span class="py-op">)</span> </span>
<span class="py-lineno"> 99</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-29" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy" class="py-name" href="#" onclick="doclink('link-29', 'ckDefaultAccuracy', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy'); return false;">ckDefaultAccuracy</a></span></span><span class="py-op">(</span><span class="py-string">"in_1day1hr"</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 1 &#1076;&#1077;&#1085;&#1100;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">100</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-30" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy" class="py-name" href="#" onclick="doclink('link-30', 'ckDefaultAccuracy', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultAccuracy()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultAccuracy'); return false;">ckDefaultAccuracy</a></span></span><span class="py-op">(</span><span class="py-string">"in_2day"</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 2 &#1076;&#1085;&#1103;"</span><span class="py-op">)</span> </span>
</div><span class="py-lineno">101</span>  <span class="py-line"> </span>
<a name="DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc1"></a><div id="DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc1-def"><span class="py-lineno">102</span> <a class="py-toggle" href="#" id="DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc1-toggle" onclick="toggle('DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc1'); return false;">-</a><span class="py-line">    <span class="py-keyword">def</span> <a class="py-def-name" href="pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#testDOTIWDefaultToTimeAcc1">testDOTIWDefaultToTimeAcc1</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc1-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc1-expanded"><span class="py-lineno">103</span>  <span class="py-line">        <span class="py-docstring">"""</span> </span>
<span class="py-lineno">104</span>  <span class="py-line"><span class="py-docstring">        Unit-tests for distance_of_time_in_words with default to_time and accuracy=1</span> </span>
<span class="py-lineno">105</span>  <span class="py-line"><span class="py-docstring">        """</span> </span>
<span class="py-lineno">106</span>  <span class="py-line">        <span class="py-comment"># accuracy = 1</span> </span>
<span class="py-lineno">107</span>  <span class="py-line"><span class="py-comment"></span>        <span class="py-name">self</span><span class="py-op">.</span><span id="link-31" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-31', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"10sec_ago"</span><span class="py-op">,</span> <span class="py-number">1</span><span class="py-op">,</span> <span class="py-string">u"&#1084;&#1077;&#1085;&#1077;&#1077; &#1084;&#1080;&#1085;&#1091;&#1090;&#1099; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">108</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-32" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-32', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"1min_ago"</span><span class="py-op">,</span> <span class="py-number">1</span><span class="py-op">,</span> <span class="py-string">u"&#1084;&#1080;&#1085;&#1091;&#1090;&#1091; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">109</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-33" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-33', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"10min_ago"</span><span class="py-op">,</span> <span class="py-number">1</span><span class="py-op">,</span>  <span class="py-string">u"10 &#1084;&#1080;&#1085;&#1091;&#1090; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">110</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-34" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-34', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"1hr_ago"</span><span class="py-op">,</span> <span class="py-number">1</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1072;&#1089; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">111</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-35" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-35', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"10hr_ago"</span><span class="py-op">,</span> <span class="py-number">1</span><span class="py-op">,</span> <span class="py-string">u"10 &#1095;&#1072;&#1089;&#1086;&#1074; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">112</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-36" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-36', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"1day_ago"</span><span class="py-op">,</span> <span class="py-number">1</span><span class="py-op">,</span> <span class="py-string">u"&#1074;&#1095;&#1077;&#1088;&#1072;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">113</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-37" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-37', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"1day1hr_ago"</span><span class="py-op">,</span> <span class="py-number">1</span><span class="py-op">,</span> <span class="py-string">u"&#1074;&#1095;&#1077;&#1088;&#1072;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">114</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-38" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-38', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"2day_ago"</span><span class="py-op">,</span> <span class="py-number">1</span><span class="py-op">,</span> <span class="py-string">u"&#1087;&#1086;&#1079;&#1072;&#1074;&#1095;&#1077;&#1088;&#1072;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">115</span>  <span class="py-line"> </span>
<span class="py-lineno">116</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-39" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-39', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_10sec"</span><span class="py-op">,</span> <span class="py-number">1</span><span class="py-op">,</span> <span class="py-string">u"&#1084;&#1077;&#1085;&#1077;&#1077; &#1095;&#1077;&#1084; &#1095;&#1077;&#1088;&#1077;&#1079; &#1084;&#1080;&#1085;&#1091;&#1090;&#1091;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">117</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-40" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-40', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_1min"</span><span class="py-op">,</span> <span class="py-number">1</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; &#1084;&#1080;&#1085;&#1091;&#1090;&#1091;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">118</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-41" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-41', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_10min"</span><span class="py-op">,</span> <span class="py-number">1</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 10 &#1084;&#1080;&#1085;&#1091;&#1090;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">119</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-42" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-42', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_1hr"</span><span class="py-op">,</span> <span class="py-number">1</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; &#1095;&#1072;&#1089;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">120</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-43" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-43', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_10hr"</span><span class="py-op">,</span> <span class="py-number">1</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 10 &#1095;&#1072;&#1089;&#1086;&#1074;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">121</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-44" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-44', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_1day"</span><span class="py-op">,</span> <span class="py-number">1</span><span class="py-op">,</span> <span class="py-string">u"&#1079;&#1072;&#1074;&#1090;&#1088;&#1072;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">122</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-45" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-45', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_1day1hr"</span><span class="py-op">,</span> <span class="py-number">1</span><span class="py-op">,</span> <span class="py-string">u"&#1079;&#1072;&#1074;&#1090;&#1088;&#1072;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">123</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-46" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-46', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_2day"</span><span class="py-op">,</span> <span class="py-number">1</span><span class="py-op">,</span> <span class="py-string">u"&#1087;&#1086;&#1089;&#1083;&#1077;&#1079;&#1072;&#1074;&#1090;&#1088;&#1072;"</span><span class="py-op">)</span> </span>
</div><span class="py-lineno">124</span>  <span class="py-line">         </span>
<a name="DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc2"></a><div id="DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc2-def"><span class="py-lineno">125</span> <a class="py-toggle" href="#" id="DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc2-toggle" onclick="toggle('DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc2'); return false;">-</a><span class="py-line">    <span class="py-keyword">def</span> <a class="py-def-name" href="pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#testDOTIWDefaultToTimeAcc2">testDOTIWDefaultToTimeAcc2</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc2-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc2-expanded"><span class="py-lineno">126</span>  <span class="py-line">        <span class="py-docstring">"""</span> </span>
<span class="py-lineno">127</span>  <span class="py-line"><span class="py-docstring">        Unit-tests for distance_of_time_in_words with default to_time and accuracy=2</span> </span>
<span class="py-lineno">128</span>  <span class="py-line"><span class="py-docstring">        """</span> </span>
<span class="py-lineno">129</span>  <span class="py-line">        <span class="py-comment"># accuracy = 2</span> </span>
<span class="py-lineno">130</span>  <span class="py-line"><span class="py-comment"></span>        <span class="py-name">self</span><span class="py-op">.</span><span id="link-47" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-47', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"10sec_ago"</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span> <span class="py-string">u"&#1084;&#1077;&#1085;&#1077;&#1077; &#1084;&#1080;&#1085;&#1091;&#1090;&#1099; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">131</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-48" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-48', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"1min_ago"</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span> <span class="py-string">u"&#1084;&#1080;&#1085;&#1091;&#1090;&#1091; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">132</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-49" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-49', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"10min_ago"</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span>  <span class="py-string">u"10 &#1084;&#1080;&#1085;&#1091;&#1090; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">133</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-50" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-50', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"1hr_ago"</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span> <span class="py-string">u"1 &#1095;&#1072;&#1089; 2 &#1084;&#1080;&#1085;&#1091;&#1090;&#1099; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">134</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-51" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-51', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"10hr_ago"</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span> <span class="py-string">u"10 &#1095;&#1072;&#1089;&#1086;&#1074; 10 &#1084;&#1080;&#1085;&#1091;&#1090; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">135</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-52" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-52', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"1day_ago"</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span> <span class="py-string">u"&#1074;&#1095;&#1077;&#1088;&#1072;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">136</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-53" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-53', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"1day1hr_ago"</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span> <span class="py-string">u"1 &#1076;&#1077;&#1085;&#1100; 1 &#1095;&#1072;&#1089; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">137</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-54" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-54', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"2day_ago"</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span> <span class="py-string">u"&#1087;&#1086;&#1079;&#1072;&#1074;&#1095;&#1077;&#1088;&#1072;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">138</span>  <span class="py-line"> </span>
<span class="py-lineno">139</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-55" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-55', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_10sec"</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span> <span class="py-string">u"&#1084;&#1077;&#1085;&#1077;&#1077; &#1095;&#1077;&#1084; &#1095;&#1077;&#1088;&#1077;&#1079; &#1084;&#1080;&#1085;&#1091;&#1090;&#1091;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">140</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-56" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-56', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_1min"</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; &#1084;&#1080;&#1085;&#1091;&#1090;&#1091;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">141</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-57" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-57', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_10min"</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 10 &#1084;&#1080;&#1085;&#1091;&#1090;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">142</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-58" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-58', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_1hr"</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 1 &#1095;&#1072;&#1089; 2 &#1084;&#1080;&#1085;&#1091;&#1090;&#1099;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">143</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-59" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-59', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_10hr"</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 10 &#1095;&#1072;&#1089;&#1086;&#1074; 10 &#1084;&#1080;&#1085;&#1091;&#1090;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">144</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-60" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-60', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_1day"</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span> <span class="py-string">u"&#1079;&#1072;&#1074;&#1090;&#1088;&#1072;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">145</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-61" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-61', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_1day1hr"</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 1 &#1076;&#1077;&#1085;&#1100; 1 &#1095;&#1072;&#1089;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">146</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-62" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-62', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_2day"</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span> <span class="py-string">u"&#1087;&#1086;&#1089;&#1083;&#1077;&#1079;&#1072;&#1074;&#1090;&#1088;&#1072;"</span><span class="py-op">)</span> </span>
</div><span class="py-lineno">147</span>  <span class="py-line">         </span>
<a name="DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc3"></a><div id="DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc3-def"><span class="py-lineno">148</span> <a class="py-toggle" href="#" id="DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc3-toggle" onclick="toggle('DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc3'); return false;">-</a><span class="py-line">    <span class="py-keyword">def</span> <a class="py-def-name" href="pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#testDOTIWDefaultToTimeAcc3">testDOTIWDefaultToTimeAcc3</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc3-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DistanceOfTimeInWordsTestCase.testDOTIWDefaultToTimeAcc3-expanded"><span class="py-lineno">149</span>  <span class="py-line">        <span class="py-docstring">"""</span> </span>
<span class="py-lineno">150</span>  <span class="py-line"><span class="py-docstring">        Unit-tests for distance_of_time_in_words with default to_time and accuracy=3</span> </span>
<span class="py-lineno">151</span>  <span class="py-line"><span class="py-docstring">        """</span> </span>
<span class="py-lineno">152</span>  <span class="py-line">        <span class="py-comment"># accuracy = 3</span> </span>
<span class="py-lineno">153</span>  <span class="py-line"><span class="py-comment"></span>        <span class="py-name">self</span><span class="py-op">.</span><span id="link-63" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-63', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"10sec_ago"</span><span class="py-op">,</span> <span class="py-number">3</span><span class="py-op">,</span> <span class="py-string">u"&#1084;&#1077;&#1085;&#1077;&#1077; &#1084;&#1080;&#1085;&#1091;&#1090;&#1099; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">154</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-64" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-64', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"1min_ago"</span><span class="py-op">,</span> <span class="py-number">3</span><span class="py-op">,</span> <span class="py-string">u"&#1084;&#1080;&#1085;&#1091;&#1090;&#1091; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">155</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-65" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-65', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"10min_ago"</span><span class="py-op">,</span> <span class="py-number">3</span><span class="py-op">,</span>  <span class="py-string">u"10 &#1084;&#1080;&#1085;&#1091;&#1090; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">156</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-66" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-66', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"1hr_ago"</span><span class="py-op">,</span> <span class="py-number">3</span><span class="py-op">,</span> <span class="py-string">u"1 &#1095;&#1072;&#1089; 2 &#1084;&#1080;&#1085;&#1091;&#1090;&#1099; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">157</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-67" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-67', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"10hr_ago"</span><span class="py-op">,</span> <span class="py-number">3</span><span class="py-op">,</span> <span class="py-string">u"10 &#1095;&#1072;&#1089;&#1086;&#1074; 10 &#1084;&#1080;&#1085;&#1091;&#1090; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">158</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-68" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-68', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"1day_ago"</span><span class="py-op">,</span> <span class="py-number">3</span><span class="py-op">,</span> </span>
<span class="py-lineno">159</span>  <span class="py-line">                                <span class="py-string">u"1 &#1076;&#1077;&#1085;&#1100; 0 &#1095;&#1072;&#1089;&#1086;&#1074; 20 &#1084;&#1080;&#1085;&#1091;&#1090; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">160</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-69" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-69', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"1day1hr_ago"</span><span class="py-op">,</span> <span class="py-number">3</span><span class="py-op">,</span> </span>
<span class="py-lineno">161</span>  <span class="py-line">                                <span class="py-string">u"1 &#1076;&#1077;&#1085;&#1100; 1 &#1095;&#1072;&#1089; 10 &#1084;&#1080;&#1085;&#1091;&#1090; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">162</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-70" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-70', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"2day_ago"</span><span class="py-op">,</span> <span class="py-number">3</span><span class="py-op">,</span> </span>
<span class="py-lineno">163</span>  <span class="py-line">                                <span class="py-string">u"2 &#1076;&#1085;&#1103; 0 &#1095;&#1072;&#1089;&#1086;&#1074; 40 &#1084;&#1080;&#1085;&#1091;&#1090; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">164</span>  <span class="py-line"> </span>
<span class="py-lineno">165</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-71" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-71', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_10sec"</span><span class="py-op">,</span> <span class="py-number">3</span><span class="py-op">,</span> <span class="py-string">u"&#1084;&#1077;&#1085;&#1077;&#1077; &#1095;&#1077;&#1084; &#1095;&#1077;&#1088;&#1077;&#1079; &#1084;&#1080;&#1085;&#1091;&#1090;&#1091;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">166</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-72" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-72', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_1min"</span><span class="py-op">,</span> <span class="py-number">3</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; &#1084;&#1080;&#1085;&#1091;&#1090;&#1091;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">167</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-73" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-73', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_10min"</span><span class="py-op">,</span> <span class="py-number">3</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 10 &#1084;&#1080;&#1085;&#1091;&#1090;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">168</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-74" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-74', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_1hr"</span><span class="py-op">,</span> <span class="py-number">3</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 1 &#1095;&#1072;&#1089; 2 &#1084;&#1080;&#1085;&#1091;&#1090;&#1099;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">169</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-75" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-75', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_10hr"</span><span class="py-op">,</span> <span class="py-number">3</span><span class="py-op">,</span> <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 10 &#1095;&#1072;&#1089;&#1086;&#1074; 10 &#1084;&#1080;&#1085;&#1091;&#1090;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">170</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-76" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-76', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_1day"</span><span class="py-op">,</span> <span class="py-number">3</span><span class="py-op">,</span> </span>
<span class="py-lineno">171</span>  <span class="py-line">                                <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 1 &#1076;&#1077;&#1085;&#1100; 0 &#1095;&#1072;&#1089;&#1086;&#1074; 20 &#1084;&#1080;&#1085;&#1091;&#1090;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">172</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-77" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-77', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_1day1hr"</span><span class="py-op">,</span> <span class="py-number">3</span><span class="py-op">,</span> </span>
<span class="py-lineno">173</span>  <span class="py-line">                                <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 1 &#1076;&#1077;&#1085;&#1100; 1 &#1095;&#1072;&#1089; 10 &#1084;&#1080;&#1085;&#1091;&#1090;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">174</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-78" class="py-name"><a title="pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime" class="py-name" href="#" onclick="doclink('link-78', 'ckDefaultToTime', 'Method pytils.test.test_dt.DistanceOfTimeInWordsTestCase.ckDefaultToTime()=pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#ckDefaultToTime'); return false;">ckDefaultToTime</a></span></span><span class="py-op">(</span><span class="py-string">"in_2day"</span><span class="py-op">,</span> <span class="py-number">3</span><span class="py-op">,</span> </span>
<span class="py-lineno">175</span>  <span class="py-line">                                <span class="py-string">u"&#1095;&#1077;&#1088;&#1077;&#1079; 2 &#1076;&#1085;&#1103; 0 &#1095;&#1072;&#1089;&#1086;&#1074; 40 &#1084;&#1080;&#1085;&#1091;&#1090;"</span><span class="py-op">)</span> </span>
</div><span class="py-lineno">176</span>  <span class="py-line"> </span>
<a name="DistanceOfTimeInWordsTestCase.testDOTWDatetimeType"></a><div id="DistanceOfTimeInWordsTestCase.testDOTWDatetimeType-def"><span class="py-lineno">177</span> <a class="py-toggle" href="#" id="DistanceOfTimeInWordsTestCase.testDOTWDatetimeType-toggle" onclick="toggle('DistanceOfTimeInWordsTestCase.testDOTWDatetimeType'); return false;">-</a><span class="py-line">    <span class="py-keyword">def</span> <a class="py-def-name" href="pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#testDOTWDatetimeType">testDOTWDatetimeType</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="DistanceOfTimeInWordsTestCase.testDOTWDatetimeType-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DistanceOfTimeInWordsTestCase.testDOTWDatetimeType-expanded"><span class="py-lineno">178</span>  <span class="py-line">        <span class="py-docstring">"""</span> </span>
<span class="py-lineno">179</span>  <span class="py-line"><span class="py-docstring">        Unit-tests for testing datetime.datetime as input values</span> </span>
<span class="py-lineno">180</span>  <span class="py-line"><span class="py-docstring">        """</span> </span>
<span class="py-lineno">181</span>  <span class="py-line">        <span class="py-name">first_time</span> <span class="py-op">=</span> <span class="py-name">datetime</span><span class="py-op">.</span><span class="py-name">datetime</span><span class="py-op">.</span><span class="py-name">now</span><span class="py-op">(</span><span class="py-op">)</span> </span>
<span class="py-lineno">182</span>  <span class="py-line">        <span class="py-name">second_time</span> <span class="py-op">=</span> <span class="py-name">first_time</span> <span class="py-op">+</span> <span class="py-name">datetime</span><span class="py-op">.</span><span class="py-name">timedelta</span><span class="py-op">(</span><span class="py-number">0</span><span class="py-op">,</span> <span class="py-number">1000</span><span class="py-op">)</span> </span>
<span class="py-lineno">183</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">assertEquals</span><span class="py-op">(</span><span id="link-79" class="py-name"><a title="pytils" class="py-name" href="#" onclick="doclink('link-79', 'pytils', 'Package pytils=pytils-module.html'); return false;">pytils</a></span></span><span class="py-op">.</span><span id="link-80" class="py-name"><a title="pytils.dt" class="py-name" href="#" onclick="doclink('link-80', 'dt', 'Module pytils.dt=pytils.dt-module.html'); return false;">dt</a></span></span><span class="py-op">.</span><span id="link-81" class="py-name"><a title="pytils.dt.distance_of_time_in_words" class="py-name" href="#" onclick="doclink('link-81', 'distance_of_time_in_words', 'Function pytils.dt.distance_of_time_in_words()=pytils.dt-module.html#distance_of_time_in_words'); return false;">distance_of_time_in_words</a></span></span><span class="py-op">(</span> </span>
<span class="py-lineno">184</span>  <span class="py-line">            <span class="py-name">from_time</span><span class="py-op">=</span><span class="py-name">first_time</span><span class="py-op">,</span> </span>
<span class="py-lineno">185</span>  <span class="py-line">            <span class="py-name">accuracy</span><span class="py-op">=</span><span class="py-number">1</span><span class="py-op">,</span> </span>
<span class="py-lineno">186</span>  <span class="py-line">            <span class="py-name">to_time</span><span class="py-op">=</span><span class="py-name">second_time</span><span class="py-op">)</span><span class="py-op">,</span> </span>
<span class="py-lineno">187</span>  <span class="py-line">                          <span class="py-string">u"16 &#1084;&#1080;&#1085;&#1091;&#1090; &#1085;&#1072;&#1079;&#1072;&#1076;"</span><span class="py-op">)</span> </span>
</div><span class="py-lineno">188</span>  <span class="py-line"> </span>
<a name="DistanceOfTimeInWordsTestCase.testDOTIWExceptions"></a><div id="DistanceOfTimeInWordsTestCase.testDOTIWExceptions-def"><span class="py-lineno">189</span> <a class="py-toggle" href="#" id="DistanceOfTimeInWordsTestCase.testDOTIWExceptions-toggle" onclick="toggle('DistanceOfTimeInWordsTestCase.testDOTIWExceptions'); return false;">-</a><span class="py-line">    <span class="py-keyword">def</span> <a class="py-def-name" href="pytils.test.test_dt.DistanceOfTimeInWordsTestCase-class.html#testDOTIWExceptions">testDOTIWExceptions</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="DistanceOfTimeInWordsTestCase.testDOTIWExceptions-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="DistanceOfTimeInWordsTestCase.testDOTIWExceptions-expanded"><span class="py-lineno">190</span>  <span class="py-line">        <span class="py-docstring">"""</span> </span>
<span class="py-lineno">191</span>  <span class="py-line"><span class="py-docstring">        Unit-tests for testings distance_of_time_in_words' exceptions</span> </span>
<span class="py-lineno">192</span>  <span class="py-line"><span class="py-docstring">        """</span> </span>
<span class="py-lineno">193</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">assertRaises</span><span class="py-op">(</span><span class="py-name">TypeError</span><span class="py-op">,</span> <span id="link-82" class="py-name"><a title="pytils" class="py-name" href="#" onclick="doclink('link-82', 'pytils', 'Package pytils=pytils-module.html'); return false;">pytils</a></span></span><span class="py-op">.</span><span id="link-83" class="py-name"><a title="pytils.dt" class="py-name" href="#" onclick="doclink('link-83', 'dt', 'Module pytils.dt=pytils.dt-module.html'); return false;">dt</a></span></span><span class="py-op">.</span><span id="link-84" class="py-name"><a title="pytils.dt.distance_of_time_in_words" class="py-name" href="#" onclick="doclink('link-84', 'distance_of_time_in_words', 'Function pytils.dt.distance_of_time_in_words()=pytils.dt-module.html#distance_of_time_in_words'); return false;">distance_of_time_in_words</a></span></span><span class="py-op">,</span> <span class="py-string">"test"</span><span class="py-op">)</span> </span>
<span class="py-lineno">194</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">assertRaises</span><span class="py-op">(</span><span class="py-name">TypeError</span><span class="py-op">,</span> <span id="link-85" class="py-name"><a title="pytils" class="py-name" href="#" onclick="doclink('link-85', 'pytils', 'Package pytils=pytils-module.html'); return false;">pytils</a></span></span><span class="py-op">.</span><span id="link-86" class="py-name"><a title="pytils.dt" class="py-name" href="#" onclick="doclink('link-86', 'dt', 'Module pytils.dt=pytils.dt-module.html'); return false;">dt</a></span></span><span class="py-op">.</span><span id="link-87" class="py-name"><a title="pytils.dt.distance_of_time_in_words" class="py-name" href="#" onclick="doclink('link-87', 'distance_of_time_in_words', 'Function pytils.dt.distance_of_time_in_words()=pytils.dt-module.html#distance_of_time_in_words'); return false;">distance_of_time_in_words</a></span></span><span class="py-op">,</span> <span class="py-name">time</span><span class="py-op">.</span><span class="py-name">time</span><span class="py-op">(</span><span class="py-op">)</span><span class="py-op">,</span> <span class="py-string">"test"</span><span class="py-op">)</span> </span>
<span class="py-lineno">195</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">assertRaises</span><span class="py-op">(</span><span class="py-name">TypeError</span><span class="py-op">,</span> <span id="link-88" class="py-name"><a title="pytils" class="py-name" href="#" onclick="doclink('link-88', 'pytils', 'Package pytils=pytils-module.html'); return false;">pytils</a></span></span><span class="py-op">.</span><span id="link-89" class="py-name"><a title="pytils.dt" class="py-name" href="#" onclick="doclink('link-89', 'dt', 'Module pytils.dt=pytils.dt-module.html'); return false;">dt</a></span></span><span class="py-op">.</span><span id="link-90" class="py-name"><a title="pytils.dt.distance_of_time_in_words" class="py-name" href="#" onclick="doclink('link-90', 'distance_of_time_in_words', 'Function pytils.dt.distance_of_time_in_words()=pytils.dt-module.html#distance_of_time_in_words'); return false;">distance_of_time_in_words</a></span></span><span class="py-op">,</span> <span class="py-name">time</span><span class="py-op">.</span><span class="py-name">time</span><span class="py-op">(</span><span class="py-op">)</span><span class="py-op">,</span> <span class="py-number">2</span><span class="py-op">,</span> <span class="py-string">"test"</span><span class="py-op">)</span> </span>
<span class="py-lineno">196</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">assertRaises</span><span class="py-op">(</span><span class="py-name">ValueError</span><span class="py-op">,</span> <span id="link-91" class="py-name"><a title="pytils" class="py-name" href="#" onclick="doclink('link-91', 'pytils', 'Package pytils=pytils-module.html'); return false;">pytils</a></span></span><span class="py-op">.</span><span id="link-92" class="py-name"><a title="pytils.dt" class="py-name" href="#" onclick="doclink('link-92', 'dt', 'Module pytils.dt=pytils.dt-module.html'); return false;">dt</a></span></span><span class="py-op">.</span><span id="link-93" class="py-name"><a title="pytils.dt.distance_of_time_in_words" class="py-name" href="#" onclick="doclink('link-93', 'distance_of_time_in_words', 'Function pytils.dt.distance_of_time_in_words()=pytils.dt-module.html#distance_of_time_in_words'); return false;">distance_of_time_in_words</a></span></span><span class="py-op">,</span> <span class="py-name">time</span><span class="py-op">.</span><span class="py-name">time</span><span class="py-op">(</span><span class="py-op">)</span><span class="py-op">,</span> <span class="py-number">0</span><span class="py-op">)</span> </span>
</div></div><span class="py-lineno">197</span>  <span class="py-line"> </span>
<a name="RuStrftimeTestCase"></a><div id="RuStrftimeTestCase-def"><span class="py-lineno">198</span> <a class="py-toggle" href="#" id="RuStrftimeTestCase-toggle" onclick="toggle('RuStrftimeTestCase'); return false;">-</a><span class="py-line"><span class="py-keyword">class</span> <a class="py-def-name" href="pytils.test.test_dt.RuStrftimeTestCase-class.html">RuStrftimeTestCase</a><span class="py-op">(</span><span class="py-base-class">unittest</span><span class="py-op">.</span><span class="py-base-class">TestCase</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="RuStrftimeTestCase-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="RuStrftimeTestCase-expanded"><span class="py-lineno">199</span>  <span class="py-line">    <span class="py-docstring">"""</span> </span>
<span class="py-lineno">200</span>  <span class="py-line"><span class="py-docstring">    Test case for pytils.dt.ru_strftime</span> </span>
<span class="py-lineno">201</span>  <span class="py-line"><span class="py-docstring">    """</span> </span>
<span class="py-lineno">202</span>  <span class="py-line"> </span>
<a name="RuStrftimeTestCase.setUp"></a><div id="RuStrftimeTestCase.setUp-def"><span class="py-lineno">203</span> <a class="py-toggle" href="#" id="RuStrftimeTestCase.setUp-toggle" onclick="toggle('RuStrftimeTestCase.setUp'); return false;">-</a><span class="py-line">    <span class="py-keyword">def</span> <a class="py-def-name" href="pytils.test.test_dt.RuStrftimeTestCase-class.html#setUp">setUp</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="RuStrftimeTestCase.setUp-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RuStrftimeTestCase.setUp-expanded"><span class="py-lineno">204</span>  <span class="py-line">        <span class="py-docstring">"""</span> </span>
<span class="py-lineno">205</span>  <span class="py-line"><span class="py-docstring">        Setting up environment for tests</span> </span>
<span class="py-lineno">206</span>  <span class="py-line"><span class="py-docstring">        """</span>         </span>
<span class="py-lineno">207</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">date</span> <span class="py-op">=</span> <span class="py-name">datetime</span><span class="py-op">.</span><span class="py-name">date</span><span class="py-op">(</span><span class="py-number">2006</span><span class="py-op">,</span> <span class="py-number">8</span><span class="py-op">,</span> <span class="py-number">25</span><span class="py-op">)</span> </span>
</div><span class="py-lineno">208</span>  <span class="py-line">     </span>
<a name="RuStrftimeTestCase.ck"></a><div id="RuStrftimeTestCase.ck-def"><span class="py-lineno">209</span> <a class="py-toggle" href="#" id="RuStrftimeTestCase.ck-toggle" onclick="toggle('RuStrftimeTestCase.ck'); return false;">-</a><span class="py-line">    <span class="py-keyword">def</span> <a class="py-def-name" href="pytils.test.test_dt.RuStrftimeTestCase-class.html#ck">ck</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span> <span class="py-param">format</span><span class="py-op">,</span> <span class="py-param">estimates</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="RuStrftimeTestCase.ck-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RuStrftimeTestCase.ck-expanded"><span class="py-lineno">210</span>  <span class="py-line">        <span class="py-docstring">"""</span> </span>
<span class="py-lineno">211</span>  <span class="py-line"><span class="py-docstring">        Checks w/o inflected</span> </span>
<span class="py-lineno">212</span>  <span class="py-line"><span class="py-docstring">        """</span> </span>
<span class="py-lineno">213</span>  <span class="py-line">        <span class="py-name">res</span> <span class="py-op">=</span> <span id="link-94" class="py-name"><a title="pytils" class="py-name" href="#" onclick="doclink('link-94', 'pytils', 'Package pytils=pytils-module.html'); return false;">pytils</a></span></span><span class="py-op">.</span><span id="link-95" class="py-name"><a title="pytils.dt" class="py-name" href="#" onclick="doclink('link-95', 'dt', 'Module pytils.dt=pytils.dt-module.html'); return false;">dt</a></span></span><span class="py-op">.</span><span id="link-96" class="py-name"><a title="pytils.dt.ru_strftime
pytils.templatetags.pytils_dt.ru_strftime" class="py-name" href="#" onclick="doclink('link-96', 'ru_strftime', 'Function pytils.dt.ru_strftime()=pytils.dt-module.html#ru_strftime,Function pytils.templatetags.pytils_dt.ru_strftime()=pytils.templatetags.pytils_dt-module.html#ru_strftime'); return false;">ru_strftime</a></span></span><span class="py-op">(</span><span class="py-name">format</span><span class="py-op">,</span> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">date</span><span class="py-op">)</span> </span>
<span class="py-lineno">214</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">assertEquals</span><span class="py-op">(</span><span class="py-name">res</span><span class="py-op">,</span> <span class="py-name">estimates</span><span class="py-op">)</span> </span>
</div><span class="py-lineno">215</span>  <span class="py-line"> </span>
<a name="RuStrftimeTestCase.ckInflected"></a><div id="RuStrftimeTestCase.ckInflected-def"><span class="py-lineno">216</span> <a class="py-toggle" href="#" id="RuStrftimeTestCase.ckInflected-toggle" onclick="toggle('RuStrftimeTestCase.ckInflected'); return false;">-</a><span class="py-line">    <span class="py-keyword">def</span> <a class="py-def-name" href="pytils.test.test_dt.RuStrftimeTestCase-class.html#ckInflected">ckInflected</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span> <span class="py-param">format</span><span class="py-op">,</span> <span class="py-param">estimates</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="RuStrftimeTestCase.ckInflected-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RuStrftimeTestCase.ckInflected-expanded"><span class="py-lineno">217</span>  <span class="py-line">        <span class="py-docstring">"""</span> </span>
<span class="py-lineno">218</span>  <span class="py-line"><span class="py-docstring">        Checks with inflected</span> </span>
<span class="py-lineno">219</span>  <span class="py-line"><span class="py-docstring">        """</span> </span>
<span class="py-lineno">220</span>  <span class="py-line">        <span class="py-name">res</span> <span class="py-op">=</span> <span id="link-97" class="py-name"><a title="pytils" class="py-name" href="#" onclick="doclink('link-97', 'pytils', 'Package pytils=pytils-module.html'); return false;">pytils</a></span></span><span class="py-op">.</span><span id="link-98" class="py-name"><a title="pytils.dt" class="py-name" href="#" onclick="doclink('link-98', 'dt', 'Module pytils.dt=pytils.dt-module.html'); return false;">dt</a></span></span><span class="py-op">.</span><span id="link-99" class="py-name"><a title="pytils.dt.ru_strftime
pytils.templatetags.pytils_dt.ru_strftime" class="py-name" href="#" onclick="doclink('link-99', 'ru_strftime', 'Function pytils.dt.ru_strftime()=pytils.dt-module.html#ru_strftime,Function pytils.templatetags.pytils_dt.ru_strftime()=pytils.templatetags.pytils_dt-module.html#ru_strftime'); return false;">ru_strftime</a></span></span><span class="py-op">(</span><span class="py-name">format</span><span class="py-op">,</span> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">date</span><span class="py-op">,</span> <span class="py-name">True</span><span class="py-op">)</span> </span>
<span class="py-lineno">221</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">assertEquals</span><span class="py-op">(</span><span class="py-name">res</span><span class="py-op">,</span> <span class="py-name">estimates</span><span class="py-op">)</span> </span>
</div><span class="py-lineno">222</span>  <span class="py-line"> </span>
<a name="RuStrftimeTestCase.ckInflectedDay"></a><div id="RuStrftimeTestCase.ckInflectedDay-def"><span class="py-lineno">223</span> <a class="py-toggle" href="#" id="RuStrftimeTestCase.ckInflectedDay-toggle" onclick="toggle('RuStrftimeTestCase.ckInflectedDay'); return false;">-</a><span class="py-line">    <span class="py-keyword">def</span> <a class="py-def-name" href="pytils.test.test_dt.RuStrftimeTestCase-class.html#ckInflectedDay">ckInflectedDay</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">,</span> <span class="py-param">format</span><span class="py-op">,</span> <span class="py-param">estimates</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="RuStrftimeTestCase.ckInflectedDay-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RuStrftimeTestCase.ckInflectedDay-expanded"><span class="py-lineno">224</span>  <span class="py-line">        <span class="py-docstring">"""</span> </span>
<span class="py-lineno">225</span>  <span class="py-line"><span class="py-docstring">        Checks with inflected day</span> </span>
<span class="py-lineno">226</span>  <span class="py-line"><span class="py-docstring">        """</span> </span>
<span class="py-lineno">227</span>  <span class="py-line">        <span class="py-name">res</span> <span class="py-op">=</span> <span id="link-100" class="py-name"><a title="pytils" class="py-name" href="#" onclick="doclink('link-100', 'pytils', 'Package pytils=pytils-module.html'); return false;">pytils</a></span></span><span class="py-op">.</span><span id="link-101" class="py-name"><a title="pytils.dt" class="py-name" href="#" onclick="doclink('link-101', 'dt', 'Module pytils.dt=pytils.dt-module.html'); return false;">dt</a></span></span><span class="py-op">.</span><span id="link-102" class="py-name"><a title="pytils.dt.ru_strftime
pytils.templatetags.pytils_dt.ru_strftime" class="py-name" href="#" onclick="doclink('link-102', 'ru_strftime', 'Function pytils.dt.ru_strftime()=pytils.dt-module.html#ru_strftime,Function pytils.templatetags.pytils_dt.ru_strftime()=pytils.templatetags.pytils_dt-module.html#ru_strftime'); return false;">ru_strftime</a></span></span><span class="py-op">(</span><span class="py-name">format</span><span class="py-op">,</span> <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">date</span><span class="py-op">,</span> <span class="py-name">inflected_day</span><span class="py-op">=</span><span class="py-name">True</span><span class="py-op">)</span> </span>
<span class="py-lineno">228</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">assertEquals</span><span class="py-op">(</span><span class="py-name">res</span><span class="py-op">,</span> <span class="py-name">estimates</span><span class="py-op">)</span> </span>
</div><span class="py-lineno">229</span>  <span class="py-line"> </span>
<a name="RuStrftimeTestCase.testRuStrftime"></a><div id="RuStrftimeTestCase.testRuStrftime-def"><span class="py-lineno">230</span> <a class="py-toggle" href="#" id="RuStrftimeTestCase.testRuStrftime-toggle" onclick="toggle('RuStrftimeTestCase.testRuStrftime'); return false;">-</a><span class="py-line">    <span class="py-keyword">def</span> <a class="py-def-name" href="pytils.test.test_dt.RuStrftimeTestCase-class.html#testRuStrftime">testRuStrftime</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="RuStrftimeTestCase.testRuStrftime-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RuStrftimeTestCase.testRuStrftime-expanded"><span class="py-lineno">231</span>  <span class="py-line">        <span class="py-docstring">"""</span> </span>
<span class="py-lineno">232</span>  <span class="py-line"><span class="py-docstring">        Unit-tests for pytils.dt.ru_strftime</span> </span>
<span class="py-lineno">233</span>  <span class="py-line"><span class="py-docstring">        """</span> </span>
<span class="py-lineno">234</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-103" class="py-name"><a title="pytils.test.test_dt.RuStrftimeTestCase.ck" class="py-name" href="#" onclick="doclink('link-103', 'ck', 'Method pytils.test.test_dt.RuStrftimeTestCase.ck()=pytils.test.test_dt.RuStrftimeTestCase-class.html#ck'); return false;">ck</a></span></span><span class="py-op">(</span><span class="py-string">u"&#1090;&#1077;&#1089;&#1090; %a"</span><span class="py-op">,</span> <span class="py-string">u"&#1090;&#1077;&#1089;&#1090; &#1087;&#1090;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">235</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-104" class="py-name"><a title="pytils.test.test_dt.RuStrftimeTestCase.ck" class="py-name" href="#" onclick="doclink('link-104', 'ck', 'Method pytils.test.test_dt.RuStrftimeTestCase.ck()=pytils.test.test_dt.RuStrftimeTestCase-class.html#ck'); return false;">ck</a></span></span><span class="py-op">(</span><span class="py-string">u"&#1090;&#1077;&#1089;&#1090; %A"</span><span class="py-op">,</span> <span class="py-string">u"&#1090;&#1077;&#1089;&#1090; &#1087;&#1103;&#1090;&#1085;&#1080;&#1094;&#1072;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">236</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-105" class="py-name"><a title="pytils.test.test_dt.RuStrftimeTestCase.ck" class="py-name" href="#" onclick="doclink('link-105', 'ck', 'Method pytils.test.test_dt.RuStrftimeTestCase.ck()=pytils.test.test_dt.RuStrftimeTestCase-class.html#ck'); return false;">ck</a></span></span><span class="py-op">(</span><span class="py-string">u"&#1090;&#1077;&#1089;&#1090; %b"</span><span class="py-op">,</span> <span class="py-string">u"&#1090;&#1077;&#1089;&#1090; &#1072;&#1074;&#1075;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">237</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-106" class="py-name"><a title="pytils.test.test_dt.RuStrftimeTestCase.ck" class="py-name" href="#" onclick="doclink('link-106', 'ck', 'Method pytils.test.test_dt.RuStrftimeTestCase.ck()=pytils.test.test_dt.RuStrftimeTestCase-class.html#ck'); return false;">ck</a></span></span><span class="py-op">(</span><span class="py-string">u"&#1090;&#1077;&#1089;&#1090; %B"</span><span class="py-op">,</span> <span class="py-string">u"&#1090;&#1077;&#1089;&#1090; &#1072;&#1074;&#1075;&#1091;&#1089;&#1090;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">238</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-107" class="py-name"><a title="pytils.test.test_dt.RuStrftimeTestCase.ckInflected" class="py-name" href="#" onclick="doclink('link-107', 'ckInflected', 'Method pytils.test.test_dt.RuStrftimeTestCase.ckInflected()=pytils.test.test_dt.RuStrftimeTestCase-class.html#ckInflected'); return false;">ckInflected</a></span></span><span class="py-op">(</span><span class="py-string">u"&#1090;&#1077;&#1089;&#1090; %B"</span><span class="py-op">,</span> <span class="py-string">u"&#1090;&#1077;&#1089;&#1090; &#1072;&#1074;&#1075;&#1091;&#1089;&#1090;&#1072;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">239</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-108" class="py-name"><a title="pytils.test.test_dt.RuStrftimeTestCase.ckInflected" class="py-name" href="#" onclick="doclink('link-108', 'ckInflected', 'Method pytils.test.test_dt.RuStrftimeTestCase.ckInflected()=pytils.test.test_dt.RuStrftimeTestCase-class.html#ckInflected'); return false;">ckInflected</a></span></span><span class="py-op">(</span><span class="py-string">u"&#1090;&#1077;&#1089;&#1090; &#1074;&#1099;&#1087;&#1086;&#1083;&#1085;&#1077;&#1085; %d %B %Y &#1075;&#1086;&#1076;&#1072;"</span><span class="py-op">,</span> </span>
<span class="py-lineno">240</span>  <span class="py-line">                          <span class="py-string">u"&#1090;&#1077;&#1089;&#1090; &#1074;&#1099;&#1087;&#1086;&#1083;&#1085;&#1077;&#1085; 25 &#1072;&#1074;&#1075;&#1091;&#1089;&#1090;&#1072; 2006 &#1075;&#1086;&#1076;&#1072;"</span><span class="py-op">)</span> </span>
<span class="py-lineno">241</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span id="link-109" class="py-name"><a title="pytils.test.test_dt.RuStrftimeTestCase.ckInflectedDay" class="py-name" href="#" onclick="doclink('link-109', 'ckInflectedDay', 'Method pytils.test.test_dt.RuStrftimeTestCase.ckInflectedDay()=pytils.test.test_dt.RuStrftimeTestCase-class.html#ckInflectedDay'); return false;">ckInflectedDay</a></span></span><span class="py-op">(</span><span class="py-string">u"&#1090;&#1077;&#1089;&#1090; &#1074;&#1099;&#1087;&#1086;&#1083;&#1085;&#1077;&#1085; &#1074; %A"</span><span class="py-op">,</span> <span class="py-string">u"&#1090;&#1077;&#1089;&#1090; &#1074;&#1099;&#1087;&#1086;&#1083;&#1085;&#1077;&#1085; &#1074; &#1087;&#1103;&#1090;&#1085;&#1080;&#1094;&#1091;"</span><span class="py-op">)</span> </span>
</div><span class="py-lineno">242</span>  <span class="py-line"> </span>
<a name="RuStrftimeTestCase.testRuStrftimeExceptions"></a><div id="RuStrftimeTestCase.testRuStrftimeExceptions-def"><span class="py-lineno">243</span> <a class="py-toggle" href="#" id="RuStrftimeTestCase.testRuStrftimeExceptions-toggle" onclick="toggle('RuStrftimeTestCase.testRuStrftimeExceptions'); return false;">-</a><span class="py-line">    <span class="py-keyword">def</span> <a class="py-def-name" href="pytils.test.test_dt.RuStrftimeTestCase-class.html#testRuStrftimeExceptions">testRuStrftimeExceptions</a><span class="py-op">(</span><span class="py-param">self</span><span class="py-op">)</span><span class="py-op">:</span> </span>
</div><div id="RuStrftimeTestCase.testRuStrftimeExceptions-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="RuStrftimeTestCase.testRuStrftimeExceptions-expanded"><span class="py-lineno">244</span>  <span class="py-line">        <span class="py-docstring">"""</span> </span>
<span class="py-lineno">245</span>  <span class="py-line"><span class="py-docstring">        Unit-tests for testing pytils.dt.ru_strftime's exceptions</span> </span>
<span class="py-lineno">246</span>  <span class="py-line"><span class="py-docstring">        """</span> </span>
<span class="py-lineno">247</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">assertRaises</span><span class="py-op">(</span><span class="py-name">TypeError</span><span class="py-op">,</span> <span id="link-110" class="py-name"><a title="pytils" class="py-name" href="#" onclick="doclink('link-110', 'pytils', 'Package pytils=pytils-module.html'); return false;">pytils</a></span></span><span class="py-op">.</span><span id="link-111" class="py-name"><a title="pytils.dt" class="py-name" href="#" onclick="doclink('link-111', 'dt', 'Module pytils.dt=pytils.dt-module.html'); return false;">dt</a></span></span><span class="py-op">.</span><span id="link-112" class="py-name"><a title="pytils.dt.ru_strftime
pytils.templatetags.pytils_dt.ru_strftime" class="py-name" href="#" onclick="doclink('link-112', 'ru_strftime', 'Function pytils.dt.ru_strftime()=pytils.dt-module.html#ru_strftime,Function pytils.templatetags.pytils_dt.ru_strftime()=pytils.templatetags.pytils_dt-module.html#ru_strftime'); return false;">ru_strftime</a></span></span><span class="py-op">,</span> <span class="py-name">time</span><span class="py-op">.</span><span class="py-name">time</span><span class="py-op">(</span><span class="py-op">)</span><span class="py-op">)</span> </span>
<span class="py-lineno">248</span>  <span class="py-line">        <span class="py-name">self</span><span class="py-op">.</span><span class="py-name">assertRaises</span><span class="py-op">(</span><span class="py-name">TypeError</span><span class="py-op">,</span> <span id="link-113" class="py-name"><a title="pytils" class="py-name" href="#" onclick="doclink('link-113', 'pytils', 'Package pytils=pytils-module.html'); return false;">pytils</a></span></span><span class="py-op">.</span><span id="link-114" class="py-name"><a title="pytils.dt" class="py-name" href="#" onclick="doclink('link-114', 'dt', 'Module pytils.dt=pytils.dt-module.html'); return false;">dt</a></span></span><span class="py-op">.</span><span id="link-115" class="py-name"><a title="pytils.dt.ru_strftime
pytils.templatetags.pytils_dt.ru_strftime" class="py-name" href="#" onclick="doclink('link-115', 'ru_strftime', 'Function pytils.dt.ru_strftime()=pytils.dt-module.html#ru_strftime,Function pytils.templatetags.pytils_dt.ru_strftime()=pytils.templatetags.pytils_dt-module.html#ru_strftime'); return false;">ru_strftime</a></span></span><span class="py-op">,</span> <span class="py-string">u"%Y.%m.%d%"</span><span class="py-op">,</span> <span class="py-name">time</span><span class="py-op">.</span><span class="py-name">time</span><span class="py-op">(</span><span class="py-op">)</span><span class="py-op">)</span> </span>
</div></div><span class="py-lineno">249</span>  <span class="py-line">         </span>
<span class="py-lineno">250</span>  <span class="py-line"> </span>
<span class="py-lineno">251</span>  <span class="py-line"><span class="py-keyword">if</span> <span class="py-name">__name__</span> <span class="py-op">==</span> <span class="py-string">'__main__'</span><span class="py-op">:</span> </span>
<span class="py-lineno">252</span>  <span class="py-line">    <span class="py-name">unittest</span><span class="py-op">.</span><span class="py-name">main</span><span class="py-op">(</span><span class="py-op">)</span> </span>
<span class="py-lineno">253</span>  <span class="py-line"> </span><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="pytils-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">Generated by Epydoc
        3.0alpha3 on Sun Oct 29 00:35:03 2006</td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
